<!--
    @title 注册界面
    @author marker
    @createTime 2016-08-13

-->
<header class="demo-bar">
    <h1>注 册</h1>
    <a class="btn-menu-bar btn-menu-list">
        <i class="am-menu-toggle-icon am-icon-bars"></i>
    </a>
</header>

<form name="myForm" class="am-form">
    <fieldset>
        <div class="am-form-group">
            <label>邮箱地址</label>
            <input type="text" name="email" ng-model="user.email" required email />
            <div class="errors">
                <span ng-show="myForm.email.$dirty && myForm.email.$error.email"
                      class="error" translate=" ">请输入正确的邮箱地址</span>
            </div>
        </div>
        <div class="am-form-group">
            <label>密码</label>
            <input type="password" name="pass" ng-model="user.pass" required />
            <div class="errors">
                <span ng-show="myForm.pass.$dirty && myForm.pass.$error.required"
                      class="error" >请输入密码</span>
            </div>
        </div>
        <div class="am-form-group">
            <label>确认密码</label>
            <input type="password" name="password" ng-model="password2" password required />
            <div class="errors">
                <span ng-show="myForm.password.$dirty && myForm.password.$error.password"
                      class="error" >两次密码不一致</span>
            </div>
        </div>
        <div class="am-form-group reg-xieyi">
            <input id="reg-agree" type="checkbox" name="agree" ng-model="user.agree" />
            <label for="reg-agree" style="font-weight: normal">同意</label> <a href="">注册协议</a>
        </div>

        <p>
            <button ng-click="register()"  ng-disabled="myForm.$invalid" class="am-btn am-btn-primary btn-login">确定注册</button>
        </p>
        <div class="">
            我还有账号,<a href="login.html">去登录</a>
        </div>
    </fieldset>
</form>